//
//  HYAboutHeaderView.m
//  XPlayer
//
//  Created by liguoqing on 2023/11/23.
//

#import "HYAboutHeaderView.h"

@interface HYAboutHeaderView ()

@property (nonatomic, strong) UIImageView *imageView;

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation HYAboutHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if(self){
        [self.contentView addSubview:self.imageView];
        [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView).offset(-20);
            make.centerX.equalTo(self.contentView);
            make.width.height.mas_equalTo(64);
        }];
        [self.contentView addSubview:self.titleLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.contentView);
            make.top.equalTo(self.imageView.mas_bottom).offset(15);
            make.height.mas_equalTo(20);
        }];
    }
    return self;
}

#pragma mark - loadLazy
- (UIImageView *)imageView
{
    if(!_imageView){
        _imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"AppIcon"]];
        _imageView.layer.cornerRadius = 4.0;
        _imageView.layer.masksToBounds = YES;
    }
    return _imageView;
}

- (UILabel *)titleLabel
{
    if(!_titleLabel){
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.text = @"VPlayer";
        _titleLabel.textColor = UIColor.systemGrayColor;
        _titleLabel.font = FONT_BOLD_SIZE(16);
    }
    return _titleLabel;
}


@end
